#ifndef SETTINGS_H
#define SETTINGS_H

#include <QSettings>
#include "Download.h"

class Settings
{
	Settings() {}

	static QSettings settings;

	static const QString maxDownloadIdKey;
	static const QString downloadsKey;

	static const QString idKey;
	static const QString nameKey;
	static const QString savingPathKey;
	static const QString downloadLinkKey;
	static const QString progressKey;
	static const QString priorityKey;
	static const QString finishedKey;
	static const QString startedKey;

	static const QString askBeforeExitKey;
	static const QString askBeforeStopDownloadKey;
	static const QString askBeforeRemoveDownloadKey;
	static const QString askBeforeOverwriteKey;

	static const QString maxParallelDownloadsKey;
public:

	static int getMaxParallelDownloadsNumber();
	static void saveMaxParallelDownloadsNumber(int maxParallelDownloads);

	static int getMaxDownloadId();
	static void saveMaxDownloadId(int id);

	static QList<Download*> getDownloadsInfo();
	static void saveDownloadsInfo(QList<Download*> info);

	static bool getAskBeforeExit();
	static void saveAskBeforeExit(bool askBeforeExit);

	static bool getAskBeforeStopDownload();
	static void saveAskBeforeStopDownload(bool askBeforeStopDownload);

	static bool getAskBeforeRemoveDownload();
	static void saveAskBeforeRemoveDownload(bool askBeforeRemoveDownload);

	static bool getAskBeforeOverwrite();
	static void saveAskBeforeOverwrite(bool askBeforeOverwrite);
};

#endif // SETTINGS_H
